package fr.seba.wawadroid.proxyweb.to;

public class WawaPost {

	private Long id;
	private String title;
	private Integer read;
	private Integer answers;
	private String user;
	
	
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Integer getRead() {
		return read;
	}
	public void setRead(Integer read) {
		this.read = read;
	}
	public Integer getAnswers() {
		return answers;
	}
	public void setAnswers(Integer answers) {
		this.answers = answers;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (obj == this)
			return true;
		if (obj.getClass() != getClass())
			return false;

		WawaPost wawaPost = (WawaPost) obj;
		if(wawaPost.getId() == null){
			return false;
		}else if (wawaPost.getId().equals(getId())){
			return true;
		}
		return false;
	}
	
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return super.hashCode();
	}
	@Override
	public String toString() {
		return id+";"+title;
	}

	
	
	@Override
	public String toString() {
		return id + ";"+ title + ";";		
	}
	
	
	
}
